package cn.kpi.dao.usualassessment;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import cn.kpi.common.persistence.MyBatisDao;
import cn.kpi.entity.usualassessment.UserUATHpDetailEntity;
import cn.kpi.entity.usualassessment.UserUATLdDetailEntity;
import cn.kpi.entity.usualassessment.UserUATPjSummaryEntity;

@MyBatisDao
public interface UserUATPjDao {
public int InsertUserUATPjSummary(UserUATPjSummaryEntity entity)throws Exception;
public int UpdateUserUATPjSummary(UserUATPjSummaryEntity entity)throws Exception;
public int InsertUserUATHpDetail(@Param("usasspjid")Long usasspjid,@Param("userid")Long userid,@Param("templateid")Long templateid)throws Exception;
public int InsertUserUATLdDetail(@Param("usasspjid")Long usasspjid,@Param("userid")Long userid,@Param("templateid")Long templateid)throws Exception;

//public int UpdateUserUATHpDetailScore(@Param("usasspjid")Long usasspjid,@Param("userid")Long userid,@Param("templateid")Long templateid,@Param("createid")Long createid,@Param("hpscore")int hpscore)throws Exception;
//public int UpdateUserUATLdDetailScore(@Param("usasspjid")Long usasspjid,@Param("userid")Long userid,@Param("templateid")Long templateid,@Param("createid")Long createid,@Param("ldscore")int ldscore)throws Exception;
public int UpdateUserUATHpDetailScore(@Param("usasspjid")Long usasspjid,@Param("userid")Long userid,@Param("templateid")Long templateid,@Param("createid")Long createid,@Param("hpscore")Float hpscore)throws Exception;
public int UpdateUserUATLdDetailScore(@Param("usasspjid")Long usasspjid,@Param("userid")Long userid,@Param("templateid")Long templateid,@Param("createid")Long createid,@Param("ldscore")Float ldscore,@Param("audioid")int audioId,@Param("audioname")String audioName)throws Exception;


public List<UserUATHpDetailEntity> GetUserUATHpDetailList(@Param("usasspjid")Long usasspjid,@Param("userid")Long userid)throws Exception;
public List<UserUATHpDetailEntity> GetUserUATHpDetailListRowSpan(@Param("usasspjid")Long usasspjid)throws Exception;
public List<UserUATLdDetailEntity> GetUserUATLdDetailList(@Param("usasspjid")Long usasspjid,@Param("userid")Long userid)throws Exception;
public List<UserUATLdDetailEntity> GetUserUATLdDetailListRowSpan(@Param("usasspjid")Long usasspjid)throws Exception;

public UserUATPjSummaryEntity GetUserUATPjSummary(@Param("userid")Long userid,@Param("templateid")Long templateid,@Param("year")int year,@Param("quarter")int quarter,@Param("pjtype")int pjtype)throws Exception;
public UserUATPjSummaryEntity GetUserUATPjSummaryById(@Param("usasspjid")Long usasspjid)throws Exception;

public List<UserUATPjSummaryEntity> GetUserUATPjSummaryList(@Param("pjtype")int pjtype,@Param("where")String where)throws Exception;
public int GetUserUATPjSummaryListCount(@Param("pjtype")int pjtype,@Param("where")String where)throws Exception;
public int DeleteUATHp(@Param("usasspjid")Long usasspjid,@Param("userid")Long userid)throws Exception;
public int DeleteUATLD(@Param("usasspjid")Long usasspjid,@Param("userid")Long userid)throws Exception;
public UserUATPjSummaryEntity GetUserUATPjSummaryForMzpd(@Param("userid")Long userid,@Param("year")int year,@Param("quarter")int quarter,@Param("pjtype")int pjtype)throws Exception;

public List<UserUATPjSummaryEntity> GetUserPjListProcess(@Param("where")String where,@Param("year")int year,@Param("quarter")int quarter,@Param("pjtype")int pjtype,@Param("beginrow")int beginrow,@Param("endrow")int endrow)throws Exception;
public int GetUserPjListProcessCount(@Param("where")String where)throws Exception;
public List<UserUATPjSummaryEntity> GetOldUserPjListProcess(@Param("where")String where,@Param("year")int year,@Param("quarter")int quarter,@Param("pjtype")int pjtype,@Param("beginrow")int beginrow,@Param("endrow")int endrow)throws Exception;
public int GetOldUserPjListProcessCount(@Param("where")String where)throws Exception;

public List<Map> GetPjOrgSumList(@Param("where")String where,@Param("year")int year,@Param("quarter")int quarter)throws Exception;

public List<Map> GetPjOrgSumListByStatustype(@Param("where")String where,@Param("year")int year,@Param("quarter")int quarter,@Param("pjtype") String pjtype)throws Exception;

public int UpdateStatus(@Param("usasspjid")Long usasspjid,@Param("status")int status)throws Exception;
public int UpdateUsasstempNodeHp(@Param("usasspjid")Long usasspjid,@Param("userid")Long userid,@Param("year")int year,@Param("quarter")int quarter)throws Exception;
public int UpdateUsasstempNodeLd(@Param("usasspjid")Long usasspjid,@Param("userid")Long userid,@Param("year")int year,@Param("quarter")int quarter)throws Exception;



public int UpdatePjStatusBm(@Param("orgid")Long orgid,@Param("year")int year,@Param("quarter")int quarter,@Param("status")int status,@Param("pjtype") int pjtype)throws Exception;
public int UpdateUsasstempNodeHpBm(@Param("orgid")Long orgid,@Param("year")int year,@Param("quarter")int quarter,@Param("status")int status,@Param("pjtype") int pjtype)throws Exception;
public int UpdateUsasstempNodeLdBm(@Param("orgid")Long orgid,@Param("year")int year,@Param("quarter")int quarter,@Param("status")int status,@Param("pjtype") int pjtype)throws Exception;
public int InsertOrgStatusEntity(@Param("orgid")Long orgid,@Param("year")int year,@Param("quarter")int quarter,@Param("pjtype") String pjtype)throws Exception;
public int UpdateOrgStatusEntityTj(@Param("orgstatustjid")Long orgstatustjid)throws Exception;
public int GetOrgStatusCount(@Param("orgid")Long orgid,@Param("year")int year,@Param("quarter")int quarter,@Param("pjtype") String pjtype)throws Exception;
}

